/* 地块分组 */
import storage from '@/common/lib/storage/index'
const _state = {
	group: getStorage()
}

function getStorage() {
	let gourp = storage.getStorageSync(storage.storageApi.groupStorage);
	return gourp
}

const mutations = {
	updateGroup(state, group) {
		state.group = group;
		storage.setStorage(storage.storageApi.groupStorage, group)
	}
}
const actions = {
	changeGroupStorage(context, group) {
		context.commit('updateGroup', group)
	}
}
const getters = {
	getGroupStorage(state) {
		return state.group;
	}
}

export default {
	state: _state,
	mutations,
	getters,
	actions
}
